Content Addressable Memories (CAMs) are commonly used in cache systems, and other address translation systems, of high speed computing systems. They are also useful in high-speed network routers, and many other applications known in the art of computing. Ternary Content Addressable Memories (TCAMs) are ternary state CAM cells and are commonly used for parallel search of high performance computing systems.
A TCAM system is composed of TCAM blocks with arrays of TCAM cells. A TCAM system typically has a TCAM block array (M×N) that includes a plurality of rows (M) and a plurality of columns (N). Further, each row has a plurality of TCAM blocks, and each TCAM block has a plurality of TCAM cells. These arrays typically have vertically running bit lines and search lines for data read/write function and horizontal running word lines and match lines. All TCAM cells in a column share the same bit lines and search lines, whereas the word lines and match lines are shared by all cells in a row. Each TCAM cell includes a pair of memory elements and a corresponding pair of compare circuits.
The TCAM cells are characterized by circuitry capable of generating a match output for each row of TCAM blocks in the TCAM cell thereby indicating whether any location of the array contains a data pattern that matches a query input and the identity of that location. Each TCAM cell typically has the ability to store a unit of data, and the ability to compare that unit of data with a unit of query input and each TCAM block has the ability to generate a match output. In parallel data search, an input keyword is placed at the search bit lines after precharging the match lines to a power supply voltage Vdd. The data in each TCAM cell connected to a match line is compared with this data, and if there is a mismatch in any cell connected to a match line, the match line will discharge to ground through the compare circuit of that TCAM cell. A compare result indication of each TCAM block in a row is combined to produce a match signal for the row to indicate whether the row of TCAM cells contains a stored word matching a query input. The match signals from each row in the TCAM cell together constitute match output signals of the array; these signals may be encoded to generate the address of matched locations or used to select data from rows of additional memory.
Each TCAM cell in each column is typically connected to a common read/write bit line pair and search bit line pair. The common read/write bit line is used to write the data to a pair of memory cells, which can be part of a TCAM cell. Each memory cell is accessed using a word line which is decoded using an input address. The common read/write bit line is also used for reading the data from a memory cell. The differential developed across the read/write bit lines are sensed using a sense amplifier during a read cycle.
Further, each TCAM cell in each column is typically connected to a common query data line, also referred to as a common search bit line. The common search bit line enables simultaneous data searching in each CAM cell in a column from a query input. The common search data line can also be used as a write data line, when the CAM cell is based on a PMOS compare circuit.
Each CAM cell in each column of a CAM array is typically connected to a common read/write bit line and a search bit line. The common read/write bit line is used to write the data to a pair of memory cells, which can be part of a ternary CAM (TCAM) cell or a single memory cell, such as a binary CAM. Each memory cell is accessed using a word line which is decoded using an input address. The common read/write bit line is also used for reading the data from a memory cell. The differential developed across the read/write bit lines are sensed using a sense amplifier during a read cycle.
Further, each CAM cell in each column in the CAM arrays is typically connected to a common query data line, also referred to as a common search data line. The common search data line enables simultaneous data searching in each CAM cell in a column from a query input. The common search data line can also be used as a write data line, when the CAM array is based on a PMOS compare circuit.
The unit of data that is stored in a TCAM cell is ternary, having three possible states: logic one, logic zero, and don't care. To store these three states, two memory elements are needed. TCAM blocks of these TCAM cells produce a local match compare result if the query input is equal to the data stored in the CAM cells in the TCAM blocks, the query input contains a don't care state, or the data stored is a don't care data. The TCAM cells produce a mismatch result otherwise. The TCAM cells are particularly useful in address translation systems that allow variable sized allocation units.
Typically, in a TCAM array, the common read/write bit lines are precharged after each write or read cycle using precharge devices. Typically, the input data during search or write mode is written in encoded form into TCAM cells. The input data at a CAM location comes in the form of a pair of input signals DATAIN (data) and DCMIN (data mask). If DCM is high, the encoded form of “don't care” during a write cycle is written into the TCAM cell. If DCM is low, the actual value of D (data) which is a “zero” or “one” gets written in an encoded form into the TCAM cell. The encoding in the TCAM cell could be (0,1) corresponding to a “zero”, or a (1,0) corresponding to a “one”, or a (0,0) corresponding to a “don't care”. The encoded writing makes it difficult to exhaustively test the bit cells for faults in the TCAM array as is typically. The bit faults in TCAMS cannot be tested using the march pattern test typically performed in the normal SRAM cells.